const { override, fixBabelImports, addWebpackResolve, addWebpackAlias, addLessLoader } = require('customize-cra')
const path = require('path')
module.exports = override(
	//配置antd-mobile
	fixBabelImports('import', {
		libraryName: 'antd-mobile',
		style: 'css',
	}),
	//配置忽略后缀名
	addWebpackResolve({
		extensions: ['.js', '.json', '.tsx', '.jsx'],
	}),
	//配置路径别名
	addWebpackAlias({
		'@': path.resolve(__dirname, 'src'),
	}),
	addLessLoader({
		lessOptions: {
			javascriptEnabled: true,
			localIdentName: '[local]--[hash:base64:5]',
		},
	})
)
